package cn.com.bluemoon.daps.model.utils.factory;

import cn.com.bluemoon.daps.model.dto.ModelTableInfoDto;
import cn.com.bluemoon.daps.model.dto.SubordinateKeyDto;
import cn.com.bluemoon.daps.model.entity.DapDataModelTable;
import cn.com.bluemoon.daps.model.entity.DapDataModelTableField;
import cn.com.bluemoon.daps.model.entity.DapDataModelTablePartition;

import java.util.List;
import java.util.Map;

/**
 * @author karry
 * @Data 2021/9/7
 * @Time:10:22
 */
public interface FieldScriptFactory {

    /**
     * 创建字段脚本
     * @param fields
     * @return
     */
    String createFieldScript(List<DapDataModelTableField> fields);

    /**
     * 新增字段脚本
     * @param fields
     * @param schema
     * @param tableName
     * @param map
     */
    void addFieldScript(List<DapDataModelTableField> fields,
                        String schema, String tableName,
                        Map<String, String> map);

    /**
     * 修改字段脚本
     * @param nf
     * @param of
     * @param tableName
     * @param schema
     * @return
     */
    String modifyFieldScript(DapDataModelTableField nf, DapDataModelTableField of, String tableName, String schema);


    /**
     * 删除字段脚本
     * @param fields
     * @param schema
     * @param tableName
     * @param map
     */
    void deleteFieldScript(List<DapDataModelTableField> fields,
                           String schema, String tableName,
                           Map<String, String> map);
}
